<?php

$name = "alex";
$nameChanged = "";

$action = "upper";

switch($action) {
    case "upper":
        $nameChanged = strtoupper($name);
    break;
    case "lower":
        $nameChanged = strtolower($name);
    break;
    default:
        $nameChanged = $name;
    break;
}

echo $nameChanged;
